// pages/share/share.js
Page({

	/**
	 * 页面的初始数据
	 */
	data: {
		http: getApp().globalData.map,
		value:'',
		value1:''
	},

	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad: function(options) {
		wx.getStorage({
			key: 'uid',
			success: (e) => {
				console.log(e)
				if(e.data.Vip==1){
					this.setData({
						state:1
					})
				}
			}
		})
		wx.request({
			url: getApp().globalData.http + 'action=gxycIndex',
			success: (e) => {
				console.log(e)
				this.setData({
					data: e.data.data
				})
			}
		})
	},
	id(e){
		this.setData({
			id:e.currentTarget.dataset.id,
			name:e.currentTarget.dataset.name,
		})
	},
	onShow() {
		if (this.data.value != this.data.value1 && this.data.value != '') {
			this.setData({
				value1: this.data.value
			})
			wx.navigateTo({
				url: 'li/li?type=' + this.data.id + '&id=' + this.data.value[0] + '&map=' + this.data.value[2] + '&name=' + this.data.name
			})
		}
	},
})
